﻿    <script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.raty.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#star').raty(
            {
                hints: ['1', '2', '3', '4', '5'],
                path: "../../Content/StarImg",
                starOff: 'star-off-big.png',
                starOn: 'star-on-big.png',
                starHalf:'star-half-big.png',
                size: 24,
                readOnly: true,
                showHalf: true,
                score: '@ViewData["AverageStarValue"]'
            }
            );

            })
   </script>

<script>
   $(document).ready((function ()
   {
       $("#nonejsaveragestar").hide();
   }))
 </script>
    平均星级：<span id="star"></span>

<span id="nonejsaveragestar">
    @for (int i = 1; i <= Convert.ToInt32(ViewData["AverageStarValue"]); i++)
    { 
        <img src="../../Content/StarImg/star-on-big.png" />
    }
    @if (Convert.ToDouble(ViewData["AverageStarValue"]) > Convert.ToDouble(Convert.ToInt32(ViewData["AverageStarValue"]))) 
    { <img src="../../Content/StarImg/star-half-big.png" />}
</span>
<span>&#8195;&#8195;评价人数：@ViewData["otalCommentCount"]</span>